ΕΠΙΣΤΡΟΦΗ
Υλοποίηση μέσω γλώσσας Wolfram στο WLJS Notebook .
Μερικές Διαφορικές Εξισώσεις
Εξίσωση θερμότητας ($\partial_{t} u-\sigma \nabla^2 u=0$)
Σε πεπερασμένο χωρίο
Clear["Global`*"]
PDE = D[u[x, t], t] - D[u[x, t], {x, 2}] == 0;
u[x, t] = X[x]*T[t]
PDE = D[u[x, t], t] - D[u[x, t], {x, 2}] == 0
init = u[x, 0] == f[x]
bound1 = u[0, t] == 0
bound2 = u[L, t] == 0
PDE[[1]]/(X[x] T[t]) // Apart
ODEt = Derivative[1][T][t]/T[t] == λ
ODEx = X''[x]/X[x] == λ
λ = -k^2
ODEx
ODEt
ODEx = X''[x] + k^2 X[x] == 0
ODEt = T'[t] + k^2 T[t] == 0
DSolve[{ODEx, X[0] == 0, X[L] == 0}, X[x], x]
k = (n Pi)/L
DSolve[{ODEx, X[0] == 0, X[L] == 0}, X[x], x]
DSolve[ODEt, T[t], t]
c[n_] := Assuming[Element[n, Integers], Integrate[f[x]*Sin[(n π x)/L], {x, 0, L}]/Integrate[Sin[(n π x)/L]^2, {x, 0, L}]]
c[n]
un[x_, t_, n_] := c[n] E^(-((n^2 π^2 t)/L^2)) Sin[(n π x)/L]
uApprox[x_, t_, n0_] := Sum[un[x, t, n], {n, 1, n0}]
uApprox[x, t, 4]
L = 2 Pi;
f[x_] := x^2
uApprox[x, t, 4]
Table[Plot3D[Evaluate[uApprox[x, t, n]], {x, 0, L}, {t, 0, 10}], {n, 2, 6}]
Plot3D[Evaluate[uApprox[x, t, 20]], {x, 0, L}, {t, 0, 10}, AxesLabel -> {"x","t"}]
Static web notebook
Author kkoud
Created Thu 11 Sep 2025 09:08:30
Κώστας Κούδας | © 2025